Method of operating an image sensor

ABSTRACT

An image sensor may include a shared memory resources which can be selectively used by a digital filter for image scaling or by a defect correction circuit.

FIELD OF THE INVENTION

The present invention relates to a method of operating an image sensor, and to an associated image sensor. In particular, the image sensor can be a CMOS image sensor.

BACKGROUND OF THE INVENTION

It is known to provide an image sensor that can scale an image, that is to re-size the image. The image data is passed through a decimating digital filter to produce a reduced size image, for efficient display on small resolution screens or for use in applications such as a viewfinder mode of a video recorder, digital still camera (DSC), or an image sensor in general. The lesser amount of data that is required for each scaled image (as compared with the amount of data required for the full field of view image) also reduces data transfer and reduces processor power consumption. An increased frame rate can also be achieved.

The scaling is enabled by line memories associated with the image sensor. The line memories are used to combine pixels from successive rows for the reconstruction of the reduced resolution image. In a color image sensor, the line memories take into account the pattern of a color filter array (CFA), in which each row comprises information on only two out of three colors in the array. A common type of CFA is a Bayer array, in which one row comprises red and green filters, while an adjacent row comprises green and blue filters.

A scaling function is useful for various applications as mentioned above. Indeed, in the field of image sensors for mobile phones, a Standard Mobile Imaging Architecture (SMIA) has been proposed which defines specifications for mobile imaging functionality, mechanics, reliability, performance characterization, and interfaces. SMIA profile 2 specifies a mandatory image scaling function, and therefore imposes a requirement for line memories for performing the scaling.

The defectivity content of a viewed image can be improved by the use of digital filters. One of the simplest is a median filter applied to a kernel of three pixel values. This filter is a moving averager. As illustrated in FIG. 1, the central value (Cx) is replaced by the average of the two adjacent values, C1 and C2. This filter moves “on the fly” along the pixel rows.

The median filter is implemented by the simple addition of registers, the required number of which depends on the image sensor system's processing power. Because no line memory is required, little area is used. However, the median filter is destructive of high frequency data. For example, in an image which includes black text on a white background which is imaged at a distance, the sharp contrast between successive dark and light portions is destroyed by the median filter, and the text appears blurred.

Given the increasing resolution and image quality requirements of sensors used for mobile imaging, there is a very high probability of major point defects due to statistical process variation, thus meaning that the simple median filter is increasingly not a practical option.

More sophisticated defect correction algorithms that give accurate results for high frequency data rely on the use of their own dedicated line memories. These line memories take up a large amount of space on the image sensor chip.

SUMMARY OF THE INVENTION

According to a first aspect of the present invention, there is provided an image sensor comprising image scaling means, or an image scaler, and defect correction means, or a defect connector, and a memory means, or memory, which is at least partly shared between said image scaling means and defect correction means.

An image sensor comprises an array of photosensitive pixels with corresponding readout and signal processing electronics. The image scaling means performs a digital filtering for the scaling of a digital image, as described above, while the defect correction means applies a defect correction algorithm to detect and correct for anomalous pixel values read out from the pixel array of an image sensor. The portion of the memory means that is shared between said image scaling means and defect correction means can be referred to as a “shared memory means”. The “sharing” of the memory means between the image scaling means and defect correction means is in the sense of the memory means being made available for use by either of the image scaling means and defect correction means. The memory means can be any type of memory element or elements that are used for the scaling or defect correction functions.

The image sensor may comprise switch means, or a switcher, for selectively allocating the shared memory means to be used with the image scaling means or the defect correction means. The image sensor may comprise control logic means, or control logic, for inputting a control signal to enable or disable each of the defect correction means or the image scaling means. The image sensor may comprise at least one register bank for the storage of the control signal status.

The shared memory means may be a sub-portion of either a memory means used by the image scaling means or a memory means used by the defect correction means. The memory means used by the image scaling means or the memory means used by the defect correction means may comprise a plurality of line memories. A “line memory” is interpreted as any memory that has enough capacity to store a word with a length corresponding at least to the number of bits received from a row of pixels in the image sensor. The shared memory means may comprise at least one line memory.

The defect correction means comprises a circuit means programmed for the operation of a defect correction algorithm. The defect correction algorithm is adapted to perform a defect correction algorithm as set out below.

The image scaling means may comprise a circuit programmed for the operation of a digital filtering algorithm for scaling an input image. The image sensor may be a CMOS image sensor.

According to a second aspect, there is provided a digital still camera including the image sensor of the first aspect. An actuator for image capture may be provided for operation by a user, with the actuator being connected to the switch means for concurrent operation therewith.

According to a third aspect, there is provided a mobile communications device including the image sensor of the first aspect. An actuator for image capture may be provided for operation by a user, with the actuator being connected to the switch means for concurrent operation therewith.

According to a fourth aspect, there is provided a method of operating an image sensor which comprises image scaling means, or an image scaler, and defect correction means, or a defect corrector. The method may comprise switching a shared memory means, or shared memory, for alternate use by one or the other of the image scaling means and defect correction means.

The method may further comprise the step of switching the image sensor between: (a) an image scaling mode wherein the image scaling means is enabled and the defect correction means is disabled, with the memory means being switched for operation with the image scaling means; and (b) an image capture mode wherein the image scaling means is disabled and the defect correction means is enabled, with the memory means being switched for operation with the defect correction means.

The shared memory means may be a sub-portion of a memory means used by one or other of the image scaling means and defect correction means. The step of switching the shared memory means may be controlled by a control logic means which inputs a control signal to enable or disable the image scaling means and/or the defect correction means.

The method may further comprise storing the control signal in a register bank. The shared memory means may comprise at least one line memory.

The step of defect correction may comprise sorting the values of a current pixel and of a plurality of neighboring pixels into rank order, and modifying the current pixel value on the basis of its place in the rank order. The value of the current pixel may be modified if its rank is greater than or less than predetermined maximum and minimum rank values.

The current pixel value may be replaced by the value of the pixel having the predetermined maximum rank value, if the current pixel value has a rank greater than said predetermined maximum rank value. The current pixel value may be replaced by the value of the pixel having the predetermined minimum rank value, if the current pixel value has a rank less than the predetermined minimum rank value. The current pixel value is left unchanged if the current pixel value has a rank less than the predetermined maximum rank value and greater than the predetermined minimum rank value.

The predetermined maximum rank value may be the highest ranking of the neighboring pixels and the predetermined minimum rank value may be the lowest ranking of the neighboring pixels. The image sensor may be a CMOS image sensor.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will now be described, by way of example only, with reference to the accompanying drawings, in which:

FIG. 1 illustrates components of a prior art image sensor; and

FIG. 2 illustrates components of an embodiment of a new image sensor.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring to FIG. 1, a prior art image sensor comprises a line converter 10 which receives image data 12 from a photodetecting circuit 13 and passes a line output to a defect correction circuit 16. The defect correction circuit 16 has a number of associated line memories 18, and has a local register bank 20 for the storage of filter control parameters. A scaler 22 is provided which has an associated line memory 24 for its operation. A local register bank 26 is provided for the storage of scaler control parameters.

The scaler 22, along with its associated line memory 24 is used to take image data as its input and to produce a reduced resolution or “scaled” image as its output. As mentioned above, the scaler is used when a device incorporating the image sensor is operated in a viewfinding mode, or other display mode where a reduced image resolution is advantageous. A scaler will typically require the use of a number of line memories (four are specified according to the SMIA profile 2 standard) for its operation. A line memory for the purposes of a scaler can also include extra memory allocation to take into account the extra memory required for the multiplication operations performed in scaling. The operation of a scaler is well known per se, and will not be described in more detail herein.

The defect correction circuit 16, using its associated line memories 18, acts on the image data to perform one or more image processing tasks, generally with a view to improving the image quality. This may include various ways of treating areas of the image which are over or under exposed, balancing image properties such as contrast, color and brightness, or may include defect correction to correct for permanent pixel defects or for individual erroneous readouts. The number of line memories 18 that are required depends on the nature of the defect correction, and can be as little as one.

As can be seen in FIG. 1, the defect correction circuit 16 has its own associated line memories 18, while the scaler 22 has its own associated line memory 24. When designing and constructing an image sensor, the defect correction circuit 16 and scaler 22 are considered as discrete modular components. The defect correction circuit and scaler 16, 22 are each provided with their own register banks 20, 26 and line memories 18, 24 so that each component is a self contained unit that performs a set function in the chip.

The space taken up by each line memory is highly significant. For a photodetecting circuit 13 comprising 2048 by 1536 pixels, each line memory has a size of 28K bit, which takes up a significant percentage of available space on the integrated circuit.

FIG. 2 shows an embodiment of the invention, wherein one or more of the illustrated line memories 28 are selectively switchable between a first mode where line memory 28 is used for image scaling, and a second mode where the memory is used for digital filtering. The line memories 28 that are switchable can be considered to be a shared memory.

Components in FIG. 2 that are the same as shown in FIG. 1 are illustrated with the same reference numerals as appear in FIG. 1, and so further explanation of their functioning will not be given here.

In contrast to FIG. 1, the image sensor of FIG. 2 comprises line memories 28 that are connected to the line converter 10 via memory control line 30 and to the scaler 22 by memory control line 32. The use of the line memories 28 is controlled by logic circuit 34, which can allocate the line memories 28 for use by either the defect corrector 16 or the scaler 22. This enables the image sensor to switch between two mutually exclusive “modes”: an image scaling mode where a line memory 28 is switched by the logic circuit 34 for use by the scaler 22 and where the defect correction circuit does not operate, and an image capture mode where all line memories 28 are switched by the logic circuit 34 for use by the defect correction circuit 16 and the scaler 22 does not operate.

Effectively, the provision of logic circuit 34 and memory control lines 30, 32 means that the scaler line memories 24 shown in FIG. 1 can be “re-used” as defect correction line memories 28 when a full field of view image is to be captured. This space efficient reuse of an existing memory resource for a secondary function means that an image sensor with both a scaling function and a sophisticated defect correction circuit can be can be fitted into a smaller area on an integrated circuit.

FIG. 2 illustrates an embodiment where all the available line memories 28 are switchable for use by either the scaler 22 or the defect correction circuit 16. As such, there is a single memory resource, which can be shared between the two components. However, in other embodiments, the shared memory elements may be only a subset of a larger memory resource. For example, a subset of a relatively large defect correction memory could be selectively switched for use as a scaler memory, or vice versa

Alternatively, separate defect correction memories and scaler memories could be formed as part of the image sensor, with a relatively small portion overlapping as the shared memory means.

An image sensor can be incorporated in a number of different devices, such as a digital still camera (DSC), camera for a mobile phone or other communications device, webcam or optical mouse. The methods for incorporation of an image sensor into these end devices is well known, and will not be described in detail herein.

In a camera, an actuator button is provided which a user presses to capture an image. This button can have a connection with the logic circuit 34 shown in FIG. 2, such that, before the button is pressed, the image scaling mode is activated and the scaled images are displayed on the viewfinder on the camera. When the button is pressed, the logic circuit 34 switches the image sensor to the image capture mode for the capture of full field of view image data.

The number of line memories that are required for use with the defect correction circuit depends on the type of defect correction algorithm that is being used, and the type of image data 12 that is generated from the photodetecting circuit 13. The scope of the present invention is not limited to any particular defect correction algorithm, but a particular example will now be illustrated in detail, to help better understand the invention.

A so-called “scythe” defect correction algorithm used with image data collected from a photodetector circuit overlaid with a Bayer pattern color filter array operates on a 5×5 pixel kernel from which a centre pixel and a color domain neighborhood of 8 pixels is extracted. The 8 pixel neighborhood is used to determine the validity of the corresponding centre pixel. This is achieved using a Batcher-Banyan network which performs full, on-the-fly ranking of 8 pixel inputs. The square pattern is due to defect detection information only occurring in pixels of the same color and consequently the Bayer Pattern architecture of the raw image array defines the patterns shown.

This defect correction algorithm acts on every pixel in an image frame, excluding those in the 2 pixel border at the edges of the image. The ranked 8 pixel neighborhood is used to define a valid pixel range within which the centre pixel should lie. If the centre pixel is within the valid pixel range, no action is taken and it passes through the filter untouched. However, if the center pixel lies outside of this range it is replaced with a function of an absolute scythe pixel, which is the neighborhood pixel which is at the extreme end of the valid pixel range closest to the center pixel, i.e. if the center pixel has a larger magnitude than the pixel at the high end of the valid pixel range, the absolute scythe pixel will be that high end pixel value.

Two six bit control signals are used to determine the ‘aggressiveness’ of the pixel correction. Each value of strength defines a weighted scythe pixel at a point between the weight outer limit pixel value and the absolute pixel value which is output as the processed pixel. Two bits of the strength control are used as a coarse ranking function and the remaining four bits are used as a weight value.

A large number of operations are performed to determine the filtered output pixel, and as a result it is not possible to calculate the output data in a single pixel clock period. Therefore the algorithm is pipelined to enable the required pixel clock rate to be achieved. In “cycle 0”, the Batcher-Banyan sort is implemented with 6 stages of pixel comparisons. The first phase is used to perform the first 4 comparisons. No other computation is performed. In “cycle 1”, the final 2 comparisons of the Batcher-Banyan sort are performed and all processing of the sorted data set to give the output data. This type of Bayer pattern based defect correction requires the use of four line memories, as is shown in FIGS. 1 and 2.

Various improvements and modifications can be made to the above without departing from the scope of the invention. 

1-26. (canceled)
 27. An image sensor comprising: an image scaler; a defect corrector; and a shared memory at least partly shared between said image scaler and said defect corrector.
 28. The image sensor of claim 27, further comprising a switcher selectively allocating the shared memory to be used with the image scaler or the defect corrector.
 29. The image sensor of claim 27, further comprising a logic controller sending a control signal to enable or disable the defect corrector and the image scaler.
 30. The image sensor of claim 29, further comprising at least one register bank storing a status of the control signal.
 31. The image sensor of claim 27, wherein the shared memory comprises a sub-portion of a memory used by the image scaler.
 32. The image sensor of claim 31, wherein the memory used by the image scaler comprises a plurality of line memories.
 33. The image sensor of claim 27, wherein the shared memory comprises a sub-portion of a memory used by the defect corrector.
 34. The image sensor of claim 27, wherein the shared memory comprises at least one line memory.
 35. The image sensor of claim 27, wherein the defect corrector comprises a circuit programmed for operation of a defect correction algorithm.
 36. The image sensor of claim 35, wherein the defect correction algorithm switches the image sensor between an image scaling mode wherein the image scaler is enabled and the defect corrector is disabled, the shared memory being switched for operation with the image scaler; and an image capture mode wherein the image scaler is disabled and the defect corrector is enabled, the shared memory being switched for operation with the defect corrector.
 37. The image sensor of claim 27, wherein the image scaler comprises a circuit programmed for operation of a digital filtering algorithm for scaling an input image.
 38. The image sensor of claim 27, comprising an array of CMOS image sensing pixels upstream of the defect corrector.
 39. An electronic device comprising: an image sensor including an image scaler, a defect corrector, and a shared memory at least partly shared between said image scaler and said defect corrector.
 40. The electronic device of claim 39, further comprising a switcher selectively allocating the shared memory to be used with the image scaler or the defect corrector.
 41. The electronic device of claim 40, further comprising an actuator for image capture operated by a user, said actuator being connected to the switcher for concurrent operation therewith.
 42. The electronic device of claim 39, wherein the defect corrector comprises a circuit programmed for operation of a defect correction algorithm.
 43. The electronic device of claim 39, further comprising a logic controller sending a control signal to enable or disable the defect corrector or the image scaler.
 44. The electronic device of claim 43, further comprising at least one register bank storing a status of the control signal.
 45. The electronic device of claim 39, wherein the shared memory comprises a sub-portion of a memory used by the image scaler.
 46. The electronic device of claim 39, wherein the shared memory comprises a sub-portion of a memory used by the defect corrector.
 47. The electronic device of claim 39, wherein the electronic device comprises at least one of a digital camera, an integrated circuit, and a mobile communications device.
 48. A method of operating an electronic device, the electronic device including an image sensor comprising an image scaler and a defect corrector, the method comprising: switching a shared memory for use by the image scaler or the defect corrector.
 49. The method of claim 48, further comprising: switching the image sensor between an image scaling mode wherein the image scaler is enabled and the defect corrector is disabled, the shared memory being switched for operation with the image scaler; and an image capture mode wherein the image scaler is disabled and the defect corrector is enabled, the shared memory being switched for operation with the defect corrector.
 50. The method of claim 48, wherein the shared memory is a sub-portion of a memory used by the image scaler.
 51. The method of claim 48, wherein the shared memory is a sub-portion of a memory used by the defect corrector.
 52. The method of claim 4S, wherein switching the shared memory is controlled by a logic controller which inputs a control signal to enable or disable the image scaler or the defect corrector.
 53. The method of claim 48, wherein the defect corrector sorts values of a current pixel and of a plurality of neighboring pixels into a rank order and modifies the current pixel value based upon its place in said rank order.
 54. The method of claim 53, wherein the value of the current pixel is modified if its rank is greater than than a predetermined maximum rank value or less than a predetermined minimum rank value.
 55. The method of claim 54, wherein the current pixel value is replaced by the value of the pixel having said predetermined maximum rank value, if the current pixel value has a rank greater than said predetermined maximum rank value.
 56. The method of claim 54, wherein the current pixel value is replaced by the value of the pixel having said predetermined minimum rank value, if the current pixel value has a rank less than said predetermined minimum rank value.
 57. The method of claim 54, wherein the current pixel value is left unchanged if the current pixel value has a rank less than said predetermined maximum rank value and greater than said predetermined minimum rank value.
 58. The method of claim 54, wherein said predetermined maximum rank value is the highest ranking of said neighboring pixels and said predetermined minimum rank value is the lowest ranking of said neighboring pixels.
 59. The method of claim 48, wherein the image sensor comprises an array of CMOS image sensing pixels upstream of the defect corrector. 